package com.wodsy.phoenix.dataobject.orderc.model;

import com.wodsy.phoenix.dataobject.base.PhoenixObject;

import javax.persistence.*;
import java.util.Date;

import static javax.persistence.GenerationType.IDENTITY;

/**
 * ItemProperty entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "tb_item_property", catalog = "orderc")
public class ItemProperty extends PhoenixObject {

	// Fields

	private Integer id;
	private Integer itemId;
	private Integer propertyId;
	private String propertyName;
	private Integer propertyValueId;
	private String propertyValueName;
	private Date createTime;
	private Date updateTime;

	// Constructors

	/** default constructor */
	public ItemProperty() {
	}

	/** minimal constructor */
	public ItemProperty(Integer itemId, Integer propertyId,
			String propertyName, Integer propertyValueId,
			String propertyValueName, Date createTime) {
		this.itemId = itemId;
		this.propertyId = propertyId;
		this.propertyName = propertyName;
		this.propertyValueId = propertyValueId;
		this.propertyValueName = propertyValueName;
		this.createTime = createTime;
	}

	/** full constructor */
	public ItemProperty(Integer itemId, Integer propertyId,
			String propertyName, Integer propertyValueId,
			String propertyValueName, Date createTime, Date updateTime) {
		this.itemId = itemId;
		this.propertyId = propertyId;
		this.propertyName = propertyName;
		this.propertyValueId = propertyValueId;
		this.propertyValueName = propertyValueName;
		this.createTime = createTime;
		this.updateTime = updateTime;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@Column(name = "item_id", nullable = false)
	public Integer getItemId() {
		return this.itemId;
	}

	public void setItemId(Integer itemId) {
		this.itemId = itemId;
	}

	@Column(name = "property_id", nullable = false)
	public Integer getPropertyId() {
		return this.propertyId;
	}

	public void setPropertyId(Integer propertyId) {
		this.propertyId = propertyId;
	}

	@Column(name = "property_name", nullable = false, length = 30)
	public String getPropertyName() {
		return this.propertyName;
	}

	public void setPropertyName(String propertyName) {
		this.propertyName = propertyName;
	}

	@Column(name = "property_value_id", nullable = false)
	public Integer getPropertyValueId() {
		return this.propertyValueId;
	}

	public void setPropertyValueId(Integer propertyValueId) {
		this.propertyValueId = propertyValueId;
	}

	@Column(name = "property_value_name", nullable = false, length = 30)
	public String getPropertyValueName() {
		return this.propertyValueName;
	}

	public void setPropertyValueName(String propertyValueName) {
		this.propertyValueName = propertyValueName;
	}

	@Column(name = "create_time", nullable = false, length = 19)
	public Date getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	@Column(name = "update_time", length = 19)
	public Date getUpdateTime() {
		return this.updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

}